package com.guchenbo.spring.boot.jdbc.mybatis;

import com.guchenbo.spring.boot.jdbc.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author guchenbo
 * @Date 2019/8/15.
 */
@Component
public class UserMybatisDao implements UserDao {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void insert() {
        User user = new User();
        user.setName("jay");
        user.setAge(18);
        userMapper.insert(user);
    }
}
